/**
 * Created by yunpeng on 2015/4/14.
 */
var express = require('express');
var router = express.Router();
var Users = require('../models/Users').Users;

router.get('/',function(req,res){
    res.send('');
});
router.post('/login', function(req, res) {//用户登录
    new Users().findUser(req.body.username,req.body.password,2,function(result){
        if(result==401){
           /* res.render('login',{msg:'登录失败'});*/
            res.send(401);
        }else{
            res.send(result);

        }

    });
});

module.exports = router;